﻿using System;
using System.Web.UI.WebControls;

public partial class aspx_admin_users : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
    {
        System.Web.Security.MembershipUser user = System.Web.Security.Membership.CreateUser(this.CreateUserWizard1.UserName, this.CreateUserWizard1.Password);
        System.Web.Security.Roles.AddUserToRole(user.UserName, "admin");
        e.Cancel = true;
        WebHelper.MessageBox.Show("用户创建成功");
    }
}